import os

def to_low_camel_case(str):
    str = str.replace(" ", "")
    list = str.split("_")
    first = list[0].lower()
    others = list[1:]
    others_cap = [word.capitalize() for word in others]
    others_cap[0:0] = [first]
    return ''.join(others_cap)


def to_cap_camel_case(str):
    str = str.replace(" ", "")
    list = str.split("_")
    result = [word.capitalize() for word in list]
    return ''.join(result)

def create_file(file_path,file_name,content):
    if not os.path.exists(file_path):
        os.makedirs(file_path)
    with open('{file_path}\\{file_name}'.format(file_path=file_path,file_name=file_name),'w',encoding='utf-8') as f:
        f.write(content)
    return True

def create_dir(target_path):
    if not os.path.exists(target_path):
        os.makedirs(target_path)

def print_create_success(file_name):
    print("{0}文件创建成功".format(file_name))

